<script type="text/javascript">
$(document).ready(function(){
	$('#regexp_submit_button').click(function(){
		var regexp_mode = $('#regex_mode_content').val();
		var is_s_state = $('#regexp_s_box').attr('checked');
		var is_i_state = $('#regexp_i_box').attr('checked');
		var regexp_content = $('#regexp_content_box').val();
		if (regexp_mode == '') {alert('匹配模式不能为空!');$('#regex_mode_content').css('border', '1px solid #D54E21');$('#regex_mode_content').focus();return false;}
		if (regexp_content == '') {alert('匹配内容不能为空!');$('#regexp_content_box').css('border', '1px solid #D54E21');$('#regexp_content_box').focus();return false;}
		$.post('<?php echo $this->create_url('index/ajax_handle_regexp'); ?>', {regexp_mode:regexp_mode,is_s_state:is_s_state,is_i_state:is_i_state,regexp_content:regexp_content}, function(data){$('#regexp_result_box').html(data);});
	});
});
</script>
<div class="content">
<!-- 正则表达式内容 -->
<div class="box" style="height:185px;">
<div class="legend">匹配内容:</div>
<div class="box_content"><textarea name="regexp_content" class="regexp_content" id="regexp_content_box"></textarea></div>
</div>
<!-- 匹配模式 -->
<div class="box" style="height:90px;">
<div class="legend">匹配模式:</div>
<div class="box_content" style="font-size:12px;"><input type="text" name="mode_content"  id="regex_mode_content" class="ip"/>&nbsp;&nbsp;&nbsp;&nbsp;<input name="regexp_s" type="checkbox" checked="checked" id="regexp_s_box"/>全局&nbsp;<input name="regexp_i" type="checkbox" checked="checked" id="regexp_i_box"/>忽略字母大小写&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="regexp_submit" value="匹配" style="width:45px; height:22px; text-align:center; border:1px solid #333; cursor:pointer" id="regexp_submit_button"/></div>
</div>
<!-- 匹配结果 -->
<div class="box" style="height:210px;">
<div class="legend">匹配结果:</div>
<div class="box_content" style="height:150px; overflow:auto;" id="regexp_result_box">
</div>
</div>
</div>